Optimal. Leaf size=261 \[ \frac {(163 A-75 B+19 C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{3/2}}+\frac {(95 A-39 B+15 C) \sin (c+d x)}{48 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {(299 A-147 B+27 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{48 a^2 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.54, antiderivative size = 261, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {4169, 4105,
4107, 4098, 3893, 212} \begin {gather*} \frac {(163 A-75 B+19 C) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(299 A-147 B+27 C) \sin (c+d x) \sqrt {\sec (c+d x)}}{48 a^2 d \sqrt {a \sec (c+d x)+a}}+\frac {(95 A-39 B+15 C) \sin (c+d x)}{48 a^2 d \sqrt {\sec (c+d x)} \sqrt {a \sec (c+d x)+a}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a \sec (c+d x)+a)^{3/2}}-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a \sec (c+d x)+a)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3893
Rule 4098
Rule 4105
Rule 4107
Rule 4169
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}} \, dx &=-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\frac {1}{2} a (11 A-3 B+3 C)-a (3 A-3 B-C) \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\frac {1}{4} a^2 (95 A-39 B+15 C)-a^2 (17 A-9 B+C) \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{3/2}}+\frac {(95 A-39 B+15 C) \sin (c+d x)}{48 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {-\frac {1}{8} a^3 (299 A-147 B+27 C)+\frac {1}{4} a^3 (95 A-39 B+15 C) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx}{12 a^5}\\ &=-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{3/2}}+\frac {(95 A-39 B+15 C) \sin (c+d x)}{48 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {(299 A-147 B+27 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{48 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {(163 A-75 B+19 C) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}\\ &=-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{3/2}}+\frac {(95 A-39 B+15 C) \sin (c+d x)}{48 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {(299 A-147 B+27 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{48 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(163 A-75 B+19 C) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}\\ &=\frac {(163 A-75 B+19 C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B+C) \sin (c+d x)}{4 d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{5/2}}-\frac {(17 A-9 B+C) \sin (c+d x)}{16 a d \sqrt {\sec (c+d x)} (a+a \sec (c+d x))^{3/2}}+\frac {(95 A-39 B+15 C) \sin (c+d x)}{48 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {(299 A-147 B+27 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{48 a^2 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.16, size = 146, normalized size = 0.56 \begin {gather*} \frac {\sec \left (\frac {1}{2} (c+d x)\right ) \sec ^{\frac {3}{2}}(c+d x) \left (24 (163 A-75 B+19 C) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos ^4\left (\frac {1}{2} (c+d x)\right )+4 (-379 A+195 B-27 C+(-479 A+255 B-39 C) \cos (c+d x)+(-80 A+48 B) \cos (2 (c+d x))+8 A \cos (3 (c+d x))) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{192 a d (a (1+\sec (c+d x)))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(623\) vs.
\(2(224)=448\).
time = 0.24, size = 624, normalized size = 2.39
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right )^{2} \left (489 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )-225 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+57 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+978 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \cos \left (d x +c \right )+64 A \left (\cos ^{4}\left (d x +c \right )\right )-450 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \cos \left (d x +c \right )+114 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \cos \left (d x +c \right )+489 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, A \sin \left (d x +c \right )-384 A \left (\cos ^{3}\left (d x +c \right )\right )-225 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, B \sin \left (d x +c \right )+192 B \left (\cos ^{3}\left (d x +c \right )\right )+57 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-686 A \left (\cos ^{2}\left (d x +c \right )\right )+318 B \left (\cos ^{2}\left (d x +c \right )\right )-78 C \left (\cos ^{2}\left (d x +c \right )\right )+408 A \cos \left (d x +c \right )-216 B \cos \left (d x +c \right )+24 C \cos \left (d x +c \right )+598 A -294 B +54 C \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {3}{2}}}{96 d \sin \left (d x +c \right )^{5} a^{3}}\) | \(624\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 410328 vs.
\(2 (224) = 448\).
time = 6.86, size = 410328, normalized size = 1572.14 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.74, size = 600, normalized size = 2.30 \begin {gather*} \left [\frac {3 \, \sqrt {2} {\left ({\left (163 \, A - 75 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (163 \, A - 75 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (163 \, A - 75 \, B + 19 \, C\right )} \cos \left (d x + c\right ) + 163 \, A - 75 \, B + 19 \, C\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + \frac {4 \, {\left (32 \, A \cos \left (d x + c\right )^{4} - 32 \, {\left (5 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{3} - {\left (503 \, A - 255 \, B + 39 \, C\right )} \cos \left (d x + c\right )^{2} - {\left (299 \, A - 147 \, B + 27 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{192 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}, -\frac {3 \, \sqrt {2} {\left ({\left (163 \, A - 75 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (163 \, A - 75 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (163 \, A - 75 \, B + 19 \, C\right )} \cos \left (d x + c\right ) + 163 \, A - 75 \, B + 19 \, C\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )}}{a \sin \left (d x + c\right )}\right ) - \frac {2 \, {\left (32 \, A \cos \left (d x + c\right )^{4} - 32 \, {\left (5 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{3} - {\left (503 \, A - 255 \, B + 39 \, C\right )} \cos \left (d x + c\right )^{2} - {\left (299 \, A - 147 \, B + 27 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{96 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________